home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / AEA / Source / Includes / AEAAppleEventSender.hh < prev    next >
Encoding:
Text File  |  2000-06-24  |  1.0 KB  |  37 lines

  1. /*    ======================
  2.  *    AEAAppleEventSender.hh
  3.  *    ======================
  4.  */
  5.  
  6. #pragma once
  7.  
  8. // Mac Universal Headers
  9. #include <AppleEvents.h>
  10. #include <EPPC.h>
  11.  
  12. #include "AEADescAppleEvent.hh"
  13.  
  14. class AEAAppleEventSender {
  15. public:
  16.     AEAAppleEventSender(AEEventClass inEventClass, AEEventID inEventID);
  17.     AEAAppleEventSender(AEEventClass inEventClass, AEEventID inEventID,
  18.         AEIdleUPP &inAEIdleUPP);
  19.     virtual ~AEAAppleEventSender();
  20.     
  21.     virtual void SetAddress(const ProcessSerialNumber &inPSN);
  22.     virtual void SetAddress(const OSType inSignature);
  23.     virtual void SetAddress(const TargetID &inTargetID);
  24.     virtual void SetGizmoBuildString(const char *inString);
  25.     virtual void Build();
  26.     virtual void Send();
  27.     virtual void SendAndWaitForReply(AppleEvent &outReply);
  28.     virtual void SendAndWaitForReply(AEADescAppleEvent &outReply);
  29. protected:
  30.     AEEventClass mEventClass;
  31.     AEEventID mEventID;
  32.     AEIdleUPP mAEIdleUPP; // default AEIdle function for sending Apple events
  33.     AEAddressDesc mAddress;
  34.     char *mGizmoBuildString;
  35.     AppleEvent mAppleEvent;
  36. };
  37.